﻿#region Copyright (c) 2008 plexBB Team

/*  Copyright (c) 2008 plexBB Team
 *  
 *  This file is free software: you may copy, redistribute and/or modify it  
 *  under the terms of the GNU General Public License as published by the  
 *  Free Software Foundation, either version 2 of the License, or (at your  
 *  option) any later version.  
 *  
 *  This file is distributed in the hope that it will be useful, but  
 *  WITHOUT ANY WARRANTY; without even the implied warranty of  
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  
 *  General Public License for more details.  
 *  
 *  You should have received a copy of the GNU General Public License  
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 */

#endregion

using System.Collections.Generic;

namespace PlexBB
{
    public class PlexBBActionData
    {
        private readonly IDictionary<string, string> _parameters;

        public PlexBBActionData(IDictionary<string, string> parameters)
        {
            _parameters = parameters;
        }

        public string Name
        {
            get
            {
                string name;
                _parameters.TryGetValue("act", out name);
                return name;
            }
        }

        public string this[string paramName]
        {
            get
            {
                string value;
                _parameters.TryGetValue(paramName, out value);
                return value;
            }
        }
    }
}